package task09;

/**
 * @author Administrator
 */
public class Tesk4 {
    public static void main(String[] args) {
        for(int i=100; i<=999;i++){
         /*  1 先把三位数i,拆分成百位a 十位ｂ　个位ｃ
           ２　判断　ｉ==a*a*a+b*b*b+c*c*c
           * true:yes
           *  false no */
            int a=i/100;
            int b=(i/10)%10;
            int c=i%10;
            if(i==a*a*a+b*b*b+c*c*c){
                System.out.println(i+"是水仙花数");
            }

        }
    }
    }

